﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Linkmeme.Models;

namespace Linkmeme.Controllers
{
    public class HomeController : BaseController
    {
        public void Index()
        {
            HomeViewData hvd = new HomeViewData();
            hvd.CurrentProviderList = new List<UserSelectedProvider>();
            if (IsUserAuthenticated)
            {
                LinkmemeDataContext context = new LinkmemeDataContext();
                hvd.CurrentProviderList = context.GetProvidersByUser(CurrentUserId);
            }

            RenderView("Index", hvd);
        }

        public void About()
        {
            RenderView("About");
        }
    }
}
